package cn.daniellee.plugin.se.util;

import org.bukkit.Bukkit;

public class Utils {

	public static final String PACKAGE_VERSION = Bukkit.getServer().getClass().getPackage().getName().replace(".", ",").split(",")[3];

	public static Class<?> getNMSClass(String nmsClassName) throws ClassNotFoundException {
		return Class.forName("net.minecraft.server." + PACKAGE_VERSION + "." + nmsClassName);
	}

	public static Class<?> getOBCClass(String nmsClassName) throws ClassNotFoundException {
		return Class.forName("org.bukkit.craftbukkit." + PACKAGE_VERSION + "." + nmsClassName);
	}

}
